package com.link2room.jetfire.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by sss on 2016/9/21.
 */
@Entity
@Table(name = "reservation_nms_sta",catalog = "")
@DynamicInsert
public class ReservationNmsSta extends BaseEntity{
    public enum ReservationNmsSta_{
        l2RNo,item,operSta,operType
    }
    private String l2RNo;
    private String item;
    private String operSta;
    private String operType;

    @Basic
    @Column(name = "l2r_no", nullable = true, length = 32)
    public String getL2RNo() {
        return l2RNo;
    }

    public void setL2RNo(String l2RNo) {
        this.l2RNo = l2RNo;
    }

    @Basic
    @Column(name = "item", nullable = true, length = 10)
    public String getItem() {
        return item;
    }

    public void setItem(String item) {
        this.item = item;
    }

    @Basic
    @Column(name = "oper_sta", nullable = true, length = 2)
    public String getOperSta() {
        return operSta;
    }

    public void setOperSta(String operSta) {
        this.operSta = operSta;
    }

    @Basic
    @Column(name = "oper_type", nullable = true, length = 8)
    public String getOperType() {
        return operType;
    }

    public void setOperType(String operType) {
        this.operType = operType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ReservationNmsSta that = (ReservationNmsSta) o;

        if (l2RNo != null ? !l2RNo.equals(that.l2RNo) : that.l2RNo != null) return false;
        if (item != null ? !item.equals(that.item) : that.item != null) return false;
        if (operSta != null ? !operSta.equals(that.operSta) : that.operSta != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = l2RNo != null ? l2RNo.hashCode() : 0;
        result = 31 * result + (item!= null ? item.hashCode() : 0);
        result = 31 * result + (operSta != null ? operSta.hashCode() : 0);
        return result;
    }
}
